home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / comm / cnet / Greed2_0.lha / Greed / Install Greed < prev    next >
Text File  |  1995-05-11  |  7KB  |  231 lines

  1. ; $VER: Install Greed Version 2.0  (15 March 1995)
  2. ; This script can be distributed with the Greed2.0 Program by
  3. ; John Shaffer & Randy Dethman & Chip Chambers
  4. ; Groovy Installer script by Spike!
  5.  
  6. ; Use these Icon Tooltypes/CLI options:
  7. ; APPNAME=Greed 2.0
  8. ;
  9.  
  10. ;check for C-net...
  11. (complete 1)
  12. (working "Locating C-net BBS...")
  13. (set Cnet (getassign "Cnet"))
  14. (if (getassign "systext")
  15.     (if (getassign "Pfiles")
  16.         (if (getassign "News")
  17.             (if Cnet
  18.                 ((message "\n\nFound C-net BBS at\n"Cnet)
  19.                 (transcript "\n\nFound C-net BBS at\n"Cnet)
  20.                 )
  21.                 (abort "\n\nYou must have C-net installed, in order to install Greed.")
  22.             )
  23.             (abort "\n\nYou must have C-net installed, in order to install Greed.")
  24.         )
  25.         (abort "\n\nYou must have C-net installed, in order to install Greed.")
  26.     )
  27.     (abort "\n\nYou must have C-net installed, in order to install Greed.")
  28. )
  29.  
  30. (set @default-dest  "Pfiles:")
  31. (if (> @user-level 0)
  32.     (if (exists "Pfiles:Greed" (noreq))
  33.         (set @default-dest "Pfiles:Greed")
  34.     )
  35. )
  36.  
  37. (if (= @user-level 0)
  38.     (if (exists "Pfiles:Greed" (noreq))
  39.         (set @default-dest "Pfiles:Greed")
  40.         (    (makedir "Pfiles:Greed" )
  41.             (set @default-dest "Pfiles:Greed")
  42.         )
  43.     )
  44. )
  45.  
  46. (set @default-dest
  47.     (askdir 
  48.         (default @default-dest)
  49.         (prompt "Please Select Directory to Install Greed:")
  50.         (help "Select the actual directory that the P-file will be "
  51.             "installed in.\n\nIf you wish it to be installed in a "
  52.             "drawer called \"Greed\", you must create it.\n\n"
  53.             @askdir-help)
  54.     )
  55. )
  56. (complete 7)
  57.  
  58. (set tttypes
  59.     (askoptions
  60.         (choices "Commodore C/G [tt1]" "IBM/ANSI [tt2]")
  61.         (default 3)
  62.         (prompt "Select Additional Terminal Types to Install:")
  63.         (help "Along with the default terminal screens, Greed contains "
  64.             "files for these standard C-net terminal types.\n\n"
  65.             "Installing these additional terminal screens is "
  66.             "optional.\n\n" @askoptions-help)
  67.     )
  68. )
  69. (complete 13)
  70.  
  71. (set Greed-modules
  72.     (askoptions
  73.         (choices "Greed Winner's News" "Auto-News during sys.welcome")
  74.         (default 3)
  75.         (prompt "Additional Greed Features to Install:")
  76.         (help "Each week, when C-net's AutoMaint resets the Greed game, "
  77.             "congratulatory mail is sent to the winners in each "
  78.             "catagory.\n\nGreed also has an optional "
  79.             "\"Winner's News\" file that may be viewed in your "
  80.             "\"News:\" subsystem.\n\nThe \"Winner's News\" may also "
  81.             "be automatically displayed by the sys.welcome files "
  82.             "during the first login for each user after Greed "
  83.             "has been reset.\n\n" @askoptions-help)
  84.     )
  85. )
  86. (complete 14)
  87.  
  88. ;if News: selected, ask dir for Greed Winners, else use Greed's dir...
  89. (set default-news @default-dest)
  90. (if (BITAND Greed-modules 1)
  91.     (set default-news
  92.         (askdir 
  93.             (default "News:")
  94.             (prompt "Please Select Directory for Winner's News:")
  95.             (help "Select the actual directory that the \"Greed Winners\" "
  96.                 "file will be created in.\n\nYou will need "
  97.                 "to add this as a News item in C-net.\n\n" @askdir-help)
  98.         )
  99.     )
  100.     (set default-news @default-dest)
  101. )
  102. (complete 22)
  103. (copyfiles
  104.     (dest @default-dest)
  105.     (source "")
  106.     (prompt "Copying Default Screens...")
  107.     (pattern "sys.#?")
  108. )
  109. (complete 38)
  110.  
  111. ;if (BITAND tttypes 1) copyfiles tt1#?
  112. (if (BITAND tttypes 1)
  113.     (copyfiles
  114.         (dest @default-dest)
  115.         (source "")
  116.         (prompt "Copying C=C/G Screens...")
  117.         (pattern "tt1.#?")
  118.     )
  119. )
  120. (complete 45)
  121.  
  122. ;if (BITAND tttypes 2) copyfiles tt2#?
  123. (if (BITAND tttypes 2)
  124.     (copyfiles
  125.         (dest @default-dest)
  126.         (source "")
  127.         (prompt "Copying IBM/ANSI Screens...")
  128.         (pattern "tt2.#?")
  129.     )
  130. )
  131. (complete 69)
  132.  
  133. ;(textfile (append "text to append")) fix Greed modules path's
  134. (set GreedPath (tackon @default-dest "x"))
  135. (set GreedPath (substr GreedPath 0 (- (strlen GreedPath) 1)))
  136. (foreach "" "_#?"
  137.     ((working "Copying/Updating Greed Modules...\n" (substr @each-name 1))
  138.     (textfile
  139.         (dest (tackon @default-dest (substr @each-name 1)))
  140.         (include @each-name)
  141.         (append (cat "GreedPath='" GreedPath "'\n"
  142.             "NewsFile='" (tackon default-news "Greed Winners") "'\n"
  143.             "return\n"))
  144.     ))
  145. )
  146. ;GreedPath='Pfiles:SinglePlayer/Greed/' <<final '/' important!
  147. ;NewsFile='News:Greed Winners'
  148. (complete 86)
  149.  
  150. ;if AutoNews selected, add line to "systext:xxx.welcome" files.
  151.  
  152. (if (BITAND Greed-modules 2)
  153.     (foreach "Systext:" "???.welcome"
  154.             (textfile
  155.                 (dest (tackon "systext:" @each-name))
  156.                 (include (tackon "Systext:" @each-name))
  157.                 (append (cat "#0 " (tackon @default-dest "GreedWelcome") "}\n" ))
  158.             )
  159.     )
  160. )
  161. (complete 99)
  162.  
  163. (if (NOT @pretend)
  164.     (message "\n\nPlease add \"" (tackon @default-dest "Greed2.0") "\" to your P-files list in "
  165.         "C-net.\n\nType = AREXX\nMore? = DISABLED")
  166. )
  167.  
  168. (if (> @user-level 0)
  169. (transcript "\n\nPlease add \"" (tackon @default-dest "Greed2.0") "\" to your P-files list in "
  170.     "C-net.\n\nType = AREXX\nMore? = DISABLED")
  171. )
  172. (if (NOT @pretend)
  173.     (message "\n\nPlease add \""(tackon @default-dest "GreedMaint") "\" to your Amaint events.\n\n"
  174.         "RunARexx " (tackon @default-dest "GreedMaint") "\nSet to occur ONE day a week.")
  175. )
  176.  
  177. (if (> @user-level 0)
  178. (transcript "\n\nPlease add \"" (tackon @default-dest "GreedMaint") "\" to your Amaint events.\n\n"
  179.     "RunARexx " (tackon @default-dest "GreedMaint") "\nSet to occur ONE day a week.")
  180. )
  181.  
  182. (if (BITAND Greed-modules 1)
  183.     (if (NOT @pretend)
  184.         ((message "\n\nPlease add \"" (tackon default-news "Greed Winners") "\" to your News "
  185.         "system.\n\nType = TEXT")
  186.     )
  187.     (if (> @user-level 0)
  188.         (transcript "\n\nPlease add \"" (tackon default-news "Greed Winners") "\" to your News "
  189.         "system.\n\nType = TEXT")
  190.     )
  191.     )
  192. )
  193.  
  194. (if (= @user-level 0)
  195.     (
  196.         (textfile
  197.             (dest "T:GreedMessage")
  198.             (append "Please add \"" (tackon @default-dest "Greed2.0") "\" to your P-files "
  199.             "list in C-net.\n\nType = AREXX\nMore? = DISABLED"
  200.             "\n----------------------------------------"
  201.             "\nPlease add \""(tackon @default-dest "GreedMaint") "\" to your Amaint events.\n\n"
  202.             "RunARexx "(tackon @default-dest "GreedMaint") "\nSet to occur ONE day a week."
  203.             "\n----------------------------------------"
  204.             "\nPlease add \"" (tackon default-news "Greed Winnerss") "\" to your News "
  205.             "system.\n\nType = TEXT"
  206.             "\n----------------------------------------"
  207.             "\nAnother wonder from:\nThe Codex BBS\nJonesboro, GA, USA\n(404) 473-6173"
  208.             )
  209.         )
  210.         (if (exists "sys:utilities/more" (noreq))
  211.             (
  212.                 (run "run sys:utilities/more T:GreedMessage")
  213.             )
  214.         )
  215.     )
  216. )
  217.  
  218. (if (> @user-level 0)
  219. (transcript "\n\nAnother wonder from:\nThe Codex BBS\nJonesboro, GA, USA\n(404) 473-6173")
  220. )
  221. (complete 101)
  222.  
  223. (if (OR (exists "sys:utilities/more" (noreq)) (> @user-level 0))
  224.     (
  225.     (exit "Another wonder from:\nThe Codex BBS\nJonesboro, GA, USA\n(404) 473-6173")
  226.     )
  227.     (
  228.     (exit "Please read the file\nT:GreedMessage\nfor specific instructions to active Greed in C-Net.")
  229.     )
  230. )
  231.